Tables
The Tables Activity in workflows lets you perform operations on tables dynamically. With this node, you can automate common table tasks such as adding, updating, deleting, or retrieving rows. This feature simplifies data management, eliminating manual intervention and enabling seamless integration between workflows and tables.
What is a Tables Activity?
A Tables Activity is a workflow node that interacts with Boltic Tables. It lets you:
- ➕ Add new rows
- ✏️ Update existing rows
- ❌ Delete rows
- 📥 Fetch rows for processing
You can power these actions using:
- Static values
- Dynamic data from previous steps in the workflow
SQL Editor
The Tables Activity in Boltic Workflows includes a powerful SQL editor that allows you to run DML queries on your tables, generate SQL from natural language using AI, and benefit from smart query suggestions as you type.
Supported SQL Operations
The SQL editor supports the following DML (Data Manipulation Language) queries:
- SELECT – Retrieve data
- INSERT – Add new data
- UPDATE – Modify data
- DELETE – Remove data
You can also:
- Use multiple tables
- Perform JOIN operations
- Write subqueries for complex logic
Writing SQL Queries
When referencing values, wrap them in single quotes ' ' for SQL compatibility.
Example:
SELECT * FROM orders WHERE status = 'shipped';
Using Dynamic Variables in Queries
- For text-based fields:
'{{step.result.field}}'
- For JSON or vector fields:
'"{{step.result.field}}"'
- For number or boolean fields:
{{step.result.field}}
- For dropdown fields:
ARRAY{{step.result.field}}
Handling NULL Values
To insert NULL values dynamically:
NULLIF('{{dynamic_value}}', 'null')::data_type
Example:
INSERT INTO customer_insights (customer_id, interaction_vector)
VALUES ('{{step.result.customer_id}}', NULLIF('"{{step.result.interaction_vector}}"', 'null')::vector);
Result Limits
By default, queries return up to 100 rows. To retrieve all rows:
SELECT * FROM orders WHERE region = 'APAC' NOLIMIT;
Generate SQL with AI
Use AI to generate SQL queries automatically. Simply describe what you need, and Boltic will build the SQL based on your table schema.
Smart Suggestions
The SQL editor provides intelligent auto-completion for:
- Table and column names
- SQL functions
- Reserved keywords
GUI Mode
You can also perform table operations visually through the GUI:
- Create Record – Add a new row to your table.
- Update Record – Modify existing rows using record IDs.
- Delete Record – Remove rows from the table.
- List Records – Retrieve and filter rows dynamically.
How to Use Tables Activity
- Add the Activity – Drag a Tables Activity into your workflow.
- Select an Action – Choose one of the supported actions.
- Configure the Action – Define table name, inputs, and conditions.
- Activate the Workflow – Save and publish your workflow.
Examples
-
Automating Lead Creation
- Trigger: Form submission detected.
- Tables Activity: Create a new record in the 'Leads' table.
-
Updating Order Status
- Trigger: Payment confirmation received.
- Tables Activity: Update the 'Orders' table to set the order as 'Shipped.'
-
Deleting a Canceled Subscription
- Trigger: Subscription cancellation detected.
- Tables Activity: Delete the record from the 'Subscriptions' table.
-
Retrieving Open Support Tickets
- Tables Activity: Fetch rows where 'Status' = 'Open.'
- Use the output in subsequent workflow nodes.
Best Practices
- Use Dynamic Data from previous nodes to make actions context-aware.
- Apply filters when listing records to improve efficiency.
- The activity lists up to 1000 rows for performance optimization.
Advanced Options
For advanced settings, refer to the Advanced Options documentation.
Troubleshooting Common Issues
| ⚠️ Error Type | Cause | Solution |
|---|---|---|
| Relation does not exist | The table name is misspelled or the table may not exist. | Use double quotes ("table_name") and confirm names in the schema viewer. |
| Column does not exist | Wrong column name or case mismatch. | Use double quotes for case-sensitive column names. |
| Syntax error near... | SQL syntax errors such as missing commas or keywords. | Validate query syntax or use AI-generated SQL. |
| Invalid input syntax for type... | Mismatched data types in query values. | Ensure types match column definitions and use CAST() if needed. |
| Queries returning empty results | Filters too restrictive or incorrect conditions. | Relax filters or use RETURNING * to debug affected rows. |